<div class="yonghu">
	<a class="btn_zhu" href="register.html" title="我的用户信息"><img src="img/user_head.png" /></a>
	<div class="login">
		<div>
			<ul>
				<li class="l first">请登录</li>
				<li class="r">还没有账号？<a href="register.html">立即注册</a></li>
			</ul>
			<div class="name y">
				账 号 <input type="text" />
			</div>
			<div class="pass y">
				密 码 <input type="password" />
			</div>
			<div class="jizhu">
				<input type="checkbox" /> 记住密码
				<a class="r" href="#">忘记密码 ? </a>
			</div>
			<a class="btn" href="index.html">立 即 登 录</a>
			<p class="arrow_1"></p>
			<p class="arrow_2"></p>
		</div>
	</div>
</div>
<div class="xiaoshou">
	<a href="javascript:;">在线销售</a>
	<div class="xiaoshou_L">
		<div>
			<div class="p1">在线销售顾问</div>
			<div class="p2"><a href="#">在线客服</a></div>
			<div class="p3"><a href="#">客服主管</a></div>
			<p class="arrow_1"></p>
			<p class="arrow_2"></p>
		</div>
	</div>
</div>
<div class="diaocha">
	<div class="diaocha_r">
		<p class="p1"><i></i>调查</p>
		<p class="p2">在线调查</p>
	</div>
	<div class="diaocha_l">
		<div>
			<div class="p3">在线调查问卷</div>
			<p class="arrow_1"></p>
			<p class="arrow_2"></p>
		</div>
	</div>
</div>
<div class="winr_gwc">
	<div class="winr_gwc_r">
		<p class="p1"><i></i>购 <br />物<br /> 车<br /><br /><span>0</span></p>
	</div>
	<div class="winr_gwc_l">
		<div class="win_l">
			<div class="go_gwc">共 <span>0</span> 件宝贝<a class="r" href="gwc.html">去购物车结算</a></div>
			<ul class="winr_goods">
			
			</ul>
			<p class="arrow_1"></p>
			<p class="arrow_2"></p>
		</div>
	</div>
</div>
<div class="guanzhu">
	<p class="p1"><i></i>关注</p>
	<p class="p2">关注店铺</p>
</div>
<div class="shoucang">
	<p class="p1"><i></i>收藏</p>
	<p class="p2">收藏商品</p>
</div>
<div class="weixin">
	<div class="weixin_r">
		<p class="p1"><i></i></p>
		<p class="p2">官方微信</p>
	</div>
	<div class="weixin_l">
		<div>
			<div class="p3"><img src="img/app.jpg" />扫描二维码 马上有礼</div>
			<p class="arrow_1"></p>
			<p class="arrow_2"></p>
		</div>
	</div>
</div>
<div class="ftop">
	<p class="p1"><i></i></p>
	<p class="p2">回到顶部</p>
</div>
<script>
	winr_gwc()
	function winr_gwc(){
		function goods(){
			var cookies = document.cookie;
			var cook = cookies.split("; ")
			var arr = [];
			var num = 0;
			for(var i = 0; i < cook.length;i++){
				var coo = cook[i].split("=");
				if(!isNaN(coo[0])){
					arr.push(coo[1]);
				}
			}
			return arr;
		}
		$.ajax({
			type:"get",
			url:"data/gwc.json",
			success:function(data){
				var mag = data.data;
				var str = "";
				arr = goods()
				for(var i = 0 ;i < arr.length;i++){
					for(var j in mag){
						if(arr[i] == mag[j].id){
							str += '<li class="shangpin">'
							str += '<dl>'
							str += '<dt class="l"><a class="btn_details" dataid="'+mag[j].id+'" href="details.html"><img src="'+mag[j].img+'"/></a></dt>'
							str += '<dd class="l"><a class="btn_details name" dataid="'+mag[j].id+'" href="details.html">'+mag[j].name+'</a><br/><span>'+mag[j].price+'</span> x <span>'+getCookie("num"+mag[j].id)+'</span></dd>'
							str += '</dl>'
							str += '<p class="delate l" dataid="'+mag[j].id+'">x</p>'
							str += '</li>';
						}
					}
				}
				$("#window_right .winr_gwc .winr_gwc_l .winr_goods").html(str);
			}
		});
		arr = goods()
		var a_length = arr.length;
		$("#window_right .winr_gwc .winr_gwc_r p span").html(a_length)
		$("#window_right .winr_gwc .winr_gwc_l .go_gwc span").html(a_length)
		$("#window_right .winr_gwc .winr_gwc_l .winr_goods").on("click",".delate",function(){
			arr = goods()
			var a_length = arr.length;
			$(this).parent().hide()
			var delateid = $(this).attr("dataid");
			removeCookie(delateid);
			removeCookie("num"+delateid);
			$("#window_right .winr_gwc .winr_gwc_r p span").html(a_length)
			$("#window_right .winr_gwc .winr_gwc_l .go_gwc span").html(a_length)
		})
	}
	$("#window_right .winr_gwc").hover(function(){
		$(this).find(".winr_gwc_l").show()
	},function(){
		$(this).find(".winr_gwc_l").hide()
	})
	$("#window_right .winr_gwc .winr_gwc_l").on("click",".btn_details",function(){
		var dataid = $(this).attr("dataid")
		setCookie("dataid",dataid)
	})
</script>




















